<template>
	<div class="imgText" v-if="data">
		 <p>{{data.title}}</p>
		 <img :src="item" alt="" v-for="item in data.imgs"/>
		 <div class="imgText__rest">
		 	<span class="imgText__rest-looks">浏览次数{{data.looks}}次</span>
		 </div>
	</div>
</template>

<script>
	export default {
		props: {
			data: {
				type: Object
			}
		}
	}
</script>

<style lang="scss" scoped>
	.imgText {
		padding: 0 $com-padding-lr-base;
		p {
			font-size: $font-md;
		}
		img {
			width: 100%;
			/*设置最大高度避免用户上传图片高度太高*/
			max-height: rem(400);
		}
	}
	.imgText__rest {
		height: rem(30);
		display: flex;
		align-items: center;
	}
	.imgText__rest-looks {
		font-size: $font-xs;
		color: $gray-light;
		margin-left: auto;
	}
</style>